home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dbase / lib19.zip / README.TXT < prev    next >
Text File  |  1992-10-14  |  67KB  |  1,247 lines

  1. ===============================================================================
  2.                                 README.TXT
  3.                     For the dUFLP LIBRARY Files (attached)
  4.                (dUFLP = dBASE User's Function Library Project)
  5.                                Version 1.9
  6.                                  10/14/92
  7. ===============================================================================
  8. This library system is freeware (no charge). This file (README.TXT) is a small 
  9. amount of description for the attached procedure file. I have spent many hours 
  10. compiling functions and procedures that I have found useful. Some of these (a 
  11. few) are ones I have written myself, many are ones I have incorporated here
  12. from a variety of sources, usually the Borland (once Ashton-Tate) Bulletin
  13. Board (BORBBS). There are a lot of good people using this board, both as 
  14. sysops/sigops, and as users, and I have learned alot about dBASE IV Programming 
  15. from these people. 
  16.  
  17. This is my attempt at returning the favor. 
  18.  
  19. All procedures/functions in PROC and accompanying files are public domain. 
  20. I ask that if you use them seperate (or in this PROC file) with your systems,
  21. that you include ALL the documentation, including (ESPECIALLY) the name of 
  22. the programmer. 
  23.  
  24. SPECIAL THANKS: To Jay Parsons (JPARSONS), who has done 1) a LOT of the 
  25. routines you will find here, and 2) a lot of work with me to ensure that
  26. there is integrety and consistency in this system.
  27.  
  28. RELATED FILES/PROGRAMS ON THE BORLAND BBS:
  29. dHUNG2.ZIP   -- a file containing the description of the dBASE User's Function
  30.                 Library Project standards (dUFLP) which are used in these 
  31.                 programs.
  32. PROCLT20.ZIP -- A program that was created to grab the procedures and functions
  33.                 in use from PROC.PRG and add them to specific programs, 
  34.                 so that when developing a system you do not need to ship PROC
  35.                 with it (which is, after all, rather huge). (Check for the
  36.                 latest version on the BBS. This has been written by Dave
  37.                 Altsol (ALTSOL) completely independant of the work done on
  38.                 these libraries ...)
  39. JPDATES.ZIP  -- A text file with most of Jay Parsons' (JPARSONS) Date handling 
  40.                 routines, including explanations of the logic behind ones like 
  41.                 the EASTER() function (which is difficult to follow, even WITH
  42.                 Jay's explanations!).
  43. MARIAN.ZIP   -- Marian the Librarian -- a routine by Jay Parsons (JPARSONS) 
  44.                 designed to help keep the whole library of functions and
  45.                 procedures under control -- watch for it.
  46. dUFLP.ZIP    -- A routine created to place the procedure/function headers into
  47.                 a database, and allow you to browse through them. This is 
  48.                 designed specifically to work for this system by Bill Ferguson
  49.                 (FERGIE).
  50.  
  51. This is a set of dynamic files -- they're always changing. Please feel free to 
  52. send me comments and/or suggestions on ways to better it (which includes both 
  53. functions and procedures, and suggestions to make the ones here better). I can 
  54. be reached on Electronic Services: 
  55.  
  56. BORBBS: KenMayer  
  57. CompuServe: 71043,3232
  58.  
  59. or at home at:
  60.  
  61.    Ken Mayer
  62.    2308 Alva Avenue
  63.    El Cerrito, CA 94530
  64.    (510) 215-5879 (Home)
  65.  
  66. ==========
  67. DISCLAIMER
  68. ==========
  69. No guarantees are given. Last attempted, all these routines worked. I take no
  70. responsibility for their use, particularly if something happens to your data.
  71.  
  72. ========
  73. PROBLEMS
  74. ========
  75. Problems with individual procedures and functions should be addressed, if 
  76. possible, to the author (note the 'Programmer' listed in the first line of
  77. the internal documentation for each routine). If you cannot reach them, contact
  78. me at my id on the BBS, and I will see what I can do.
  79.  
  80. ============
  81. INSTRUCTIONS
  82. ============
  83. ---------------------------
  84. dBASE IV, version 1.5 users
  85. ---------------------------
  86. In order to use these, you need to understand (and this is brief) how dBASE IV,
  87. version 1.5 uses functions and libraries. Basically, it follows a 'search path'
  88. based on your programs and files, as well as its own internal functions.
  89. dBASE starts at the top of the following list, and if it cannot find the 
  90. function or procedure named in your program, it goes to the next item in the 
  91. list until it either finds it, or doesn't find it, as the case may be. If not,
  92. you will get the dBASE error message about not finding a function.
  93.  
  94. 1)  dBASE INTERNAL FUNCTIONS AND COMMANDS
  95. 2)  SYSPROC = "System Procedure Filename" (set in CONFIG.DB)
  96. 3)  Current Program (the one executing at that time)
  97. 4)  SET PROCEDURE TO <proc name>
  98. 5)  Calling Program (a main menu program, for example)
  99. 6)  SET LIBRARY TO <library name>
  100.  
  101. To use these files in dBASE IV, version 1.5, you should something along
  102. the following lines as a layout: 
  103.  
  104.    For any procedures/functions that are required specifically for your
  105.    system, and no other, place those in your own procedure file, and
  106.    refer to that in the SYSPROC command in your CONFIG.DB file. Example:
  107.  
  108.    SYSPROC = MYPROC
  109.  
  110.    To use the 'standard' library file for this system, in your main program 
  111.    (by 'main program' we could be discussing a MENU program, or other front-
  112.    end program) put the command:
  113.  
  114.    SET PROCEDURE TO PROC  && or point to the appropriate directory
  115.    
  116.    And in the appropriate programs, or where needed,
  117.  
  118.    SET LIBRARY TO <library file> && based on those below
  119.  
  120. This is just one method of handling this. One thing that can make life easier,
  121. if you switch LIBRARY files a lot, is the dBASE IV, 1.5 option to the SET
  122. command:  SET("LIBRARY"). This can be used in the following manner:
  123.  
  124.     cLibrary = set("LIBRARY")  && save current library name
  125.     set library to NEWLIB      && set new one
  126.     *-- do function/procedure calls from new library
  127.     set library to &cLibrary   && return to previous library file
  128.  
  129.      OR you could use the new function SwitchLib():
  130.  
  131.     cOldLib = switchlib("FILES")
  132.     *-- execute function/procedure
  133.     cOldLib = switchlib("&cOldLib")
  134.  
  135. SUGGESTION: If you store your copy of the LIBRARY files (and PROC) in another
  136. directory on the drive, you might want to define a public memvar called
  137. something like:  c_LibPath and store the path in in. This way you can
  138. use that with your routines to call the libraries. Something along the following
  139. could be useful:
  140.  
  141. PUBLIC c_LibPath
  142. Store "C:\DBFILES\PROC\" to c_LibPath
  143.   *-- processing
  144. cOldLib = SwitchLib("&c_LibPath.FILES")  && send with path, as well as filename
  145. *-- execute function/procedure
  146. cOldLib = SwitchLib("&cOldLib")          && should return path
  147.  
  148. This will make it easier to update if you are setting this up for a client --
  149. you can change the c_LibPath variable in the setup or menu program ONCE, and
  150. not have to worry about it again.
  151.  
  152. NOTE: that in some of the library files there are functions which require 
  153. the use of functions in OTHER files (i.e., some functions in NAVIGATE use 
  154. some functions that are in TRIG). I have attempted to ensure that I have copied
  155. INTO those library files the appropriate functions, so you don't spend too much
  156. time tearing your hair out.
  157.  
  158. -------------------
  159. dBASE IV, 1.1 Users
  160. -------------------
  161. To use these procedure files in their entirety, use the DOS Copy command to 
  162. concatenate the library files to the PROC file. Something along the following
  163. lines (although you should check to make sure you have all the files):
  164.  
  165. COPY PROC.PRG+SCREEN.PRG+COLOR.PRG+TRIG.PRG+CONVERT.PRG+ <etc.>
  166.  
  167. You should note that in some of the library files, there are duplicated 
  168. functions used, due to the fact that some users in 1.5 might wish to only use
  169. one or two of the library files. You can also use just the individual library
  170. files in your SET PROCEDURE command, if you wish. 
  171.  
  172. Add to your programs (a menu or startup routine is one of the best places) 
  173. the line:
  174.  
  175. SET PROCEDURE TO PROC
  176.  
  177. To use individual routines, rather than the whole library, extract them using 
  178. your favorite ASCII editor, or remove the routines from this file (you might 
  179. want to copy it first) that you do not feel you will need.
  180.  
  181. ================================================================================
  182. WHAT'S HERE?
  183. ================================================================================
  184.  
  185. Some of the places routines are placed may seem a bit arbitrary -- they are. 
  186. These decisions were made based on the functions/procedures I use the most in 
  187. my own routines. Since the original purpose of this library was my own use, 
  188. I felt it my prerogative to be the one to make the final decision as to what 
  189. routines were left in PROC.PRG, and which got moved to the LIBRARY files. 
  190.  
  191. Included in this LIBRARY System are the following files:
  192.  
  193. Text Files
  194. README.TXT   -- You're looking at it.
  195. WHATS.NEW    -- This is a description of the new features for this system.
  196. CONTRIB.TXT  -- How to contribute to the Library Project.
  197. JPMOUSE.TXT  -- An explanation from Jay on the JPMOUSE.BIN file, attached
  198.                 (with his permission). See also the function ISMOUSE() and
  199.                 procedure file SETMOUSE in PROC.PRG.
  200. DISK.TXT     -- A very brief discussion on the use of DISK.BIN.
  201. SEARCH.TXT   -- A very brief discussion on the use of SEARCH.BIN.
  202.  
  203. Procedure and Library Files -- Described Below
  204. ARRAY.PRG
  205. COLOR.PRG
  206. CONVERT.PRG
  207. DATES.PRG
  208. FIELDS.PRG
  209. FILES.PRG
  210. FINANCE.PRG
  211. FRPG.PRG
  212. MEASURE.PRG
  213. MISC.PRG
  214. NAVIGATE.PRG
  215. OBSOLETE.PRG
  216. PROC.PRG
  217. SCA.PRG
  218. SCREEN.PRG
  219. STATS.PRG
  220. STRINGS.PRG
  221. TIME.PRG
  222. TRIG.PRG
  223. WINDOWS.PRG
  224.  
  225. BIN Files -- used in routines attached.
  226. JPMOUSE.BIN
  227. DISK.BIN
  228. SEARCH.BIN
  229.  
  230. Below is a quick list of all the procedures and functions included in the 
  231. library files in the sequence they are presented in the programs themselves:
  232.  
  233. ===================================
  234. PROC.PRG -- The MAIN PROCEDURE File
  235. ===================================
  236.  
  237. ----------------------------------
  238. MESSAGE/SCREEN PROCESSING ROUTINES
  239. ----------------------------------
  240. PrintErr    -- used to display a "standard" error message for printer 
  241.                errors (is it on, online, out of paper?).
  242.                Usage: do PrintErr
  243. Open_Screen -- Used to add texture to the background for an opening screen or
  244.                menu.
  245.                Usage: do Open_Screen
  246. JazClear    -- performs a nice center to edge of screen clear (using a box) ...
  247.                Usage: do JazClear
  248. Wipe        -- performs a left-to-right wipe of a window. Nice effect.
  249.                Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  250. Center      -- used to center text anywhere on the screen (optional colors).
  251.                Usage: do Center with <nRow>,<nWidth>,"<cColors>","<cText>"
  252. Surround()  -- Used to display text at X,Y position, surrounded with a double-
  253.                line box.
  254.                Usage: Surround(<nRow>,<nCol>,"<cColor>","<cText>")
  255. Message1()  -- Displays a single-line message, waits for user to press a key
  256.                before program moves on.
  257.                Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
  258. Message2()  -- Same as above, but displays message in a window (with shadow).
  259.                Usage: Message2("<cText>","<cColor>")
  260. Message3()  -- Same as above, but will handle LONG messages, wrapping inside
  261.                window.
  262.                Usage: Message3("<cText>","<cColor>")
  263. Message4()  -- 2-Line message in a window, pauses for user.
  264.                Usage: Message4("<cText1>","<cText2>","<cColor>")
  265. Monitor     -- Displays a box, showing total records in database -- is designed
  266.                to be used in a system that does a record-by-record update, 
  267.                so the user knows something is happening. You need to add code
  268.                to display actual record numbers as the task is happening.
  269.                Usage: do Monitor with "<cText>","<cColors>"
  270. Monitoroff  -- Cleanup for Monitor procedure above.
  271.                Usage: do MonitorOff
  272. ScrnHead()  -- Used to display a screen header inside a box (with a shadow).
  273.                Usage: ScrnHead("<cColor>","<cText>")
  274. YesNo()     -- Used to ask a "yes/no" type question, allows three lines of 
  275.                message, and uses menu pads to choose (move cursor, press 
  276.                <enter>).
  277.                Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
  278.                              "<cColors>")
  279. YesNo2()    -- As above, but allows programmer to choose position on screen.
  280.                Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  281.                            "<cMess3>","<cColors>")
  282.                    where cWhere may be one of the following:
  283.                          UL = Upper Left
  284.                          UC = Upper Center
  285.                          UR = Upper Right
  286.                          CL = Center Left
  287.                          CC = Center Center
  288.                          CR = Center Right
  289.                          BL = Bottom Left
  290.                          BC = Bottom Center
  291.                          BR = Bottom Right
  292.                    Anything else will default to CC.
  293. ErrorMsg()  -- Allows 2 lines of message, first is ** ERROR **, or optionally,
  294.                ** ERROR # **  where '#' is a number (if "<cErr>" is empty,
  295.                (""), system uses first option, but there must be SOMETHING
  296.                there). 
  297.                Usage: ErrorMsg("<cErr>","<cMess1>","<cMess2>","<cColors>")
  298. Shadow      -- Used for windows/boxes to display a shadow, giving 3-D effect.
  299.                Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  300. VPick()     -- Multiple-item Picklist -- this routine will allow you to create
  301.                a simple vertical picklist of items, returning the first letter 
  302.                of the option selected, or a null string if the user pressed 
  303.                <Esc>.
  304.                Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  305.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  306. HPick()     -- Very much like VPICK() above, but does a Horizontal Picklist.
  307.                Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  308.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  309.  
  310. -------------------------
  311. COLOR PROCESSING ROUTINES
  312. -------------------------
  313. SetColor    -- Sets colors to contents of a memvar to handle various parts of
  314.                the screen. THIS IS A NEW ROUTINE -- USERS OF THE OLD 
  315.                SETCOLOR and SETCOLOR2 ROUTINES SHOULD CHECK "OBSOLETE.PRG".
  316.                Usage: do SetColor with <cColorVar>
  317. ReColor     -- Restores colors to those held in a string of the form returned
  318.                by SET("ATTRIBUTE").
  319.                Usage: Do ReColor with <cColors>
  320. ColorBrk()  -- Returns one of three portions of a color variable as used in
  321.                many of my own routines (YESNO, etc.). Used for explicitly
  322.                setting colors.
  323.                Usage: ColorBrk(<cColorVar>,<nField>)
  324.  
  325. ----------------------------
  326. STRING MANIPULATION ROUTINES
  327. ----------------------------
  328. AllTrim()   -- Trims both sides of a character field/memvar.
  329.                Usage: AllTrim(<cString>)
  330. State()     -- This is used for validation of a STATE (two letter) code ... 
  331.                (returns .t. or .f.) -- useful for data entry.
  332.                Usage: State(<cState>)
  333.  
  334. ----------------------
  335. DATE HANDLING ROUTINES
  336. ----------------------
  337. DateText()  -- Convert date to Month Day, Year format.
  338.                Usage: DateText(<dDate>)
  339. DateText2() -- As above, adds day of week (DoW, Month Day, Year).
  340.                Usage: DateText2(<dDate>)
  341. Age()       -- Returns the age of someone as of DATE(), given their birthdate.
  342.                Usage: Age(<dDate>)
  343.  
  344. -----------------------
  345. FIELD HANDLING ROUTINES
  346. -----------------------
  347. IsUnique()  -- Used to check a keyfield in a database to see if it's unique.
  348.                Usage: IsUnique(<xValue>,<cOrder>)
  349.  
  350. --------------
  351. MISC. ROUTINES
  352. --------------
  353. SetPrint    -- Used to setup the printer memory variables for a print job.
  354.                Usage: do SetPrint
  355. DosRun()    -- Used to execute a DOS command/program from inside dBASE, handles
  356.                windows and such by restoring them when done.
  357.                Usage: DosRun(<cCmd>)
  358. ScrnRpt()   -- Shows a dBASE Report on screen, and pauses when the screen is
  359.                full.
  360.                Usage: ScrnRpt(<cRpt>)
  361. SwitchLib() -- Changes the current library file to another. Useful when doing
  362.                quick changes to execute a function/file in another library.
  363.                Usage: SwitchLib(<cNewLib>)
  364. IsMouse()   -- Looks at system for a mouse driver, if there, it turns off
  365.                the mouse. Uses JPMOUSE.BIN.
  366.                Usage: IsMouse()
  367. SetMouse    -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
  368.                memvar c_Mouse set to the most current state ("OFF" means
  369.                the mouse is "OFF" ... and will be toggled ON in the next
  370.                call to SetMouse).
  371.                Usage: On Key label ... DO SetMouse
  372. VerLevel()  -- Used to return numeric value of current version of dBASE or
  373.                RUNTIME. Useful with those version specific routines.
  374.                Usage: VerLevel()
  375.  
  376. =============
  377. LIBRARY FILES
  378. =============
  379.  
  380. The following files are the 'library' files that contain all routines in this
  381. system not contained in PROC.PRG. See the section of this document marked
  382. 'INSTRUCTIONS' for how to use these. Please notice that some functions which
  383. are used in specific LIBRARY files (such as NAVIGATE.PRG, which uses some of
  384. the functions in TRIG.PRG) are duplicated in some of the other library files.
  385. This was done to make life easier on the programmer. Since dBASE IV, 1.5 does
  386. not allow multiple library files (although one can hope for such a feature in
  387. future editions), we are stuck having to duplicate some routines.
  388.  
  389. -----------------------------
  390. SCREEN.PRG -- Screen Handling
  391. -----------------------------
  392. Radio()     -- This routine creates a "radio-button" routine. You can have
  393.                up to four options. Returns # of item chosen ...
  394.                Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>","<cTxt2>",;
  395.                              "<cTxt3>","<cTxt4>","<cTitle>","<cColor>")
  396. CheckBox    -- This routine does a "CheckBox" much like Windows/Mac type
  397.                software, with up to four options. NOTE -- the items marked
  398.                in the format must be a) logical, and b) fields/memvars.
  399.                They cannot be literal values, due to limitations of dBASE
  400.                parameter handling.
  401.                Usage: Do CheckBox with <nULRow>,<nULCol>,<lChk1>,<lChk2>,;
  402.                                         <lChk3>,<lChk4>,"<cTxt1>",;
  403.                                         "<cTxt2>","<cTxt3>","<cTxt4>",;
  404.                                         "<cTxt0>","<cColor>"
  405. MenuPad()   -- Used to define menu pad and popup bars as a specific length.
  406.                Function will truncate if longer than needed, and will
  407.                pad with spaces otherwise.
  408.                Usage: MenuPad("<nChoice>",<nLength>)
  409. Banner()    -- Used to display a scrolling "banner" message on the screen.
  410.                Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>","<cColor>")
  411. SeeMatch()  -- Displays instant lookup match on a field in a shadowed box.
  412.                Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",<nULRow>,;
  413.                                <nULCol>,<nBRRow>,<nBRCol>,"<cColor>")
  414. MsgExp()    -- Used to display a message (or an error message), centered on
  415.                the screen. Does not use the "(Press Space)" bits that dBASE
  416.                uses on an error message ... The message and the line on which
  417.                it is displayed will be the same color.
  418.                Usage: MsgExp("<cExp>")
  419. Dialog()    -- Routine to provide a 'standard' set of dialog boxes and buttons
  420.                for all applications. 
  421.                Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,<lShadow>,;
  422.                              "<cWind>","<cButton>")
  423.                nType is used to describe the dialog box type, options are:
  424.                0:      'OK'
  425.                1: 'OK' 'CANCEL'
  426.                2: 'ABORT'  'RETRY'  'IGNORE'
  427.                3: 'YES'  'NO'   'CANCEL'
  428.                4: 'YES'  'NO'
  429.                5: 'RETRY'   'CANCEL'
  430. Pick2()     -- This picklist routine creates a picklist that determines it's
  431.                own location on the screen by calling a couple of other functions
  432.                (below).
  433.                Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>","cRetFld>",;
  434.                             <nScrRow>,<nScrCol>)
  435. ScrRow()    -- Returns the row position of the current 'Get'. If the memvar
  436.                nScrRow already exists, it returns the value in that memvar.
  437.                Usage: ScrRow()
  438. ScrCol()    -- Returns the column position of the current 'Get'. Works like 
  439.                above, but for column.
  440.                Usage: ScrCol()
  441. YesNoCan()  -- A dialog box, defaults to 'Yes/No/Cancel', varies in size,
  442.                depending on programmer needs, optional row position. Nice
  443.                modification of the YESNO() function in PROC.PRG.
  444.                Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>","<cMess3>",;
  445.                                "<cPrompt1>","<cPrompt2>","<cPrompt3>",;
  446.                                <nTopRow>,"<cColor>")
  447. ProgBar     -- Monitor program activity, so user does not get worried that
  448.                the machine went into limbo. A graphic version of what the
  449.                "MONITOR" procedure in PROC.PRG does.
  450.                Usage: Do ProgBar with <nQuan>,"<cWindCol>","<cFillCol1>",;
  451.                                  "<cFillCol2>","<cMessage>",<nWindWidth>
  452. ProgBar2    -- Same as above, but a bit simpler to use.
  453.                Usage: Do ProgBar2 with <nQuan>,"<cWindCol>","<cFillCol2>",;
  454.                                  "<cFillCol2>"
  455. MovePad     -- Moves menu pad on selection of a letter. 
  456.                Usage: Do MenuPad with <cLetter>,<lSelect>,<cChoices>
  457.  
  458. -----------------------------
  459. COLOR.PRG -- Color Processing
  460. -----------------------------
  461. AttriByte() -- Returns the attribute byte of a dBASE Color code.
  462.                Usage: AttriByte("<cCode>")
  463. ColorName() -- Converts an attribute value for an area to the name of the
  464.                corresponding color combination. 
  465.                Usage: ColorName(<nAttr>)
  466. ColorCode() -- Given a color attribute byte, returns dBASE color code.
  467.                Usage: ColorCode(<nAttr>)
  468. ColorOf()   -- Returns the color of attributes in dBASE, as currently set.
  469.                Usage: ColorOf("<cArea>")
  470.  
  471. ------------------------------------------
  472. STRINGS.PRG -- Character String Processing
  473. ------------------------------------------
  474. Proper()    -- Converts text to "proper" case (upper/lower case, handles
  475.                contractions, Mc, Mac, etc.). Useful for names (converts first
  476.                letter to upper case, the rest to lower, except as above).
  477.                Usage: Proper("<cArg>")
  478. Justify()   -- Used to justify a field or memvar (or character expression) 
  479.                within a specific field width. 
  480.                Usage: Justify(<cFld>,<nLength>,"<cType>")
  481.                    cType must be L (left), C (center), or R (right)
  482. Dots()      -- Used to pad a field with dots (dot leader, trailer ...) 
  483.                Usage: Dots(<cFld>,<nLength>,"<cType>")
  484.                    cType must be L (left), C (center), or R (right)
  485. CutPaste()  -- Used to Cut a string and Paste another in it's place. It's
  486.                an easier way to use the STUFF() function.
  487.                Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
  488. LastWord()  -- Used to return the last "word" of a string of characters (words
  489.                being bracketed by spaces).
  490.                Usage: LastWord(<cString>)
  491. VStretch()  -- Displays a long character field (254 char) on screen, with
  492.                wrap-around, and handles proper word-breaks - you give
  493.                dimensions for where you want it displayed (window).
  494.                Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  495. AtCount()   -- Returns the number of times a string is found in another.
  496.                Usage: AtCount(<cFindStr>,<cBigStr>)
  497. IsAlNum()   -- If first character of string is alphabetic or digit, returns
  498.                .t., otherwise returns .f..
  499.                Usage: IsAlNum(<cChar>)
  500. IsAscii()   -- If first character is in ASCII (normal, not extended) character
  501.                set, returns .t., otherwise returns .f..
  502.                Usage: IsAscii(<cChar>)
  503. IsCntrl()   -- If first character is a delete or control character, returns
  504.                .t., otherwise returns .f..
  505.                Usage: IsCntrl(<cChar>)
  506. IsDigit()   -- If first character is a digit, returns .t..
  507.                Usage: IsDigit(<cChar>)
  508. IsPrint()   -- If first character is a printing character (space through
  509.                chr(126), returns .t..
  510.                Usage: IsPrint(<cChar>)
  511. IsXDigit()  -- If first character is possible hexadecimal digit, returns .t..
  512.                Usage: IsXDigit(<cChar>)
  513. IsSpace()   -- Returns .t. if first character is space, tab, carriage return,
  514.                line feed, vertical tab, or formfeed.
  515.                Usage: IsSpace(<cChar>)
  516. Name2Label()-- Returns a name held in five fields as a single field for the
  517.                purpose of printing in a label.
  518.                Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
  519.                                   <cMidName>,<cLastName>,<cSuffix>)
  520. StrpBrk()   -- Search string for first occurrence of any specific character(s).
  521.                Usage: StrpBrk(<cCharSet>,<cBigStr>)
  522. RAt()       -- Reverse AT() - returns position of a character string in its  
  523.                last position in a larger string ...
  524.                Usage: RAt(<cFindStr>,<cBigStr>)
  525. StrRev()    -- Reverse a string.
  526.                Usage: StrRev(<cAnyStr>)
  527. Strip2Val() -- Strip characters from the left until reaching one that might
  528.                begin a numeric value ...
  529.                Usage: Strip2Val(<cString>)
  530. StripVal()  -- Strip characters until reaching one that is NOT part of a
  531.                number.
  532.                Usage: StripVal(<cString>)
  533. ParseWord() -- Finds first word in a character string.
  534.                Usage: ParseWord(<cW>)
  535. StripWord() -- Removes first word in character string.
  536.                Usage: StripWord(<cW>)
  537. Plural()    -- Returns the "plural" of a noun. This will fit most cases, but not
  538.                all, as English has too many exceptions. 
  539.                Usage: Plural(<nItems>,"<cNoun>")
  540. StrComp()   -- Compares the contents of two strings.
  541.                Usage: StrComp(<cStr1>,<cStr2>)
  542. StrOccur()  -- Calculates the number of occurences of a string in another,
  543.                works for character memvar/field, and memo fields.
  544.                Usage: StrOccur(<cInString>,<cFindString>)
  545. NumOccur()  -- Calculates the number of occurences of a string in another.
  546.                Usage: NumOccur(<cInString>,<cFindString>)
  547. ReplMemo()  -- Globally searches and replaces a string with another string
  548.                in a character field/memvar or memo field.
  549.                Usage: ReplMemo(<cSource>,<cCurrStr>,<cNewStr>)
  550. MemStuff()  -- Replaces a specific string in a character string, by another.
  551.                Returns the resultant string.
  552.                Usage: MemStuff(<cSource>,<cCurrStr>,<cNewStr>)
  553. Stub()      -- Returns a specific number of characters from a given string, 
  554.                adding characters in cIn to the end of it.
  555.                Usage: Stub(<cString>,<nIn>,<cIn>)
  556. FirstMem()  -- Capitalizes the first character of all the words in the string
  557.                passed as a parameter, returns resultant string (unless a memo,
  558.                in which case, returns a .T.)
  559.                Usage: FirstMem(<cInStr>)
  560. FirstCap()  -- Capitalizes the first character of a string.
  561.                Usage: FirstCap(<cInString>)
  562.  
  563. -----------------------------------------------
  564. CONVERT.PRG -- Numeric Conversions/calculations
  565. -----------------------------------------------
  566. Roman()     -- Function to return a Roman Numeral based on input of an Arabic.
  567.                Usage: Roman(<nArabic>)
  568. Arabic()    -- Opposite of Roman (takes Roman Numeral provided, returns
  569.                Arabic).
  570.                Usage: Arabic("<cRoman>")
  571. Factorial() -- Does what it sounds like, it returns the factorial of a value.
  572.                Usage: Factorial(<nNumber>)
  573. IsPrime()   -- Determines if the argument passed is a prime positive integer.
  574.                Usage: IsPrime(<nNumber>)
  575. BankRound() -- Rounds numeric argument to given # of places using "Banker's 
  576.                rule."
  577.                Usage: BankRound(<nNumber>,<nPlaces>)
  578. Num2Str()   -- Number to String, uses ASCII 1/2 and 1/4 instead of decimals
  579.                where appropriate.
  580.                Usage: Num2Str(<nNumber>)
  581. Dec2Hex()   -- Decimal to Hexadecimal conversion.
  582.                Usage: Dec2Hex(<nDecimal>)
  583. Hex2Dec()   -- Hexadecimal to Decimal conversion.
  584.                Usage: Hex2Dec(<cHex>)
  585. Hex2Bin()   -- Hexadecimal to Binary conversion.
  586.                Usage: Hex2Bin(<cHex>)
  587. Bin2Hex()   -- Binary to Hexadecimal conversion.
  588.                Usage: Bin2Hex(<cBin>)
  589. Dec2Oct()   -- Decimal to Octal conversion.
  590.                Usage: Dec2Oct(<nDec>)
  591. Oct2Dec()   -- Octal to Decimal conversion.
  592.                Usage: Oct2Dec(<xOct>)
  593. Cash2Check()-- Converts a number of dollars and cents to a string of words.
  594.                Usage: Cash2Check(<nCash>)
  595. Num2Words() -- Converts an integer to a string of words.
  596.                Usage: Num2Words(<nNum>)
  597. Thou2Words()-- Converts a positive integer less than 1000 to a string of words.
  598.                Usage: Thou2Words(<nNum>)
  599. Ord()       -- Converts an integer to ordinal representation.
  600.                Usage: Ord(<nNum>)
  601. Num2Word()  -- Converts an integer to a string of words -- self-contained
  602.                function, does not call other functions. 
  603.                Usage: Num2Word(<nValue>)
  604. Num2Real()  -- Converts a number to the ASCII representation of its storage in
  605.                IEEE 8-byte real format.
  606.                Usage: Num2Real(<nNum>,<nExp>)
  607. Dec2Bin()   -- Decimal to Binary conversion.
  608.                Usage: Dec2Bin(<nNum>,<nPlaces>)
  609. Frac2Bin()  -- Converts the fractional part of a decimal number to a
  610.                character string giving its ASCII binary representation.
  611.                Usage: Frac2Bin(<nNum>,<nPlaces>)
  612.  
  613. -----------------------------------
  614. DATES.PRG -- Date Handling Routines
  615. -----------------------------------
  616. DateText3() -- As DateText() and DateText2() in PROC.PRG, returns: Month, Year.
  617.                Usage: DateText3(<dDate>)
  618. Age2()      -- Returns age of someone on the date of a specific event.
  619.                Usage: Age2(<dDate>,<dEvent>)
  620. Annivrsry() -- Checks to see if a birthday or other specific "anniversary" is 
  621.                within a range of dates.
  622.                Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
  623. AddMonths() -- Returns the exact date 'N' months from give date.
  624.                Usage: AddMonths(<dDate>,<nMonths>)
  625. AddYears()  -- Returns the exact date 'N' Years from given date.
  626.                Usage: AddYears(<dDate>,<nYears>)
  627. IsLeap()    -- Returns .t./.f. if year is a leap year... (year in YY or YYYY
  628.                formats)
  629.                Usage: IsLeap(<nYear>)
  630. DoY()       -- Day of Year -- returns "Julian" date (US Government version ...)
  631.                -- this is the number of days a date is from January 1 of that
  632.                year (i.e., 11/14/91 = 318).
  633.                Usage: DoY(<dDate>)
  634. WeekNo()    -- Returns the week number of the date (there are 52 weeks a year,
  635.                right?). 
  636.                Usage: WeekNo(<dDate>)
  637. Holiday()   -- Returns the date of specific "floating" holidays for a given
  638.                year, requires a one-letter code. See full doc in DATES.PRG.
  639.                Usage: Holiday(<nYear>,<cCode>)
  640.                Where cCode may be one of the following:
  641.                      P = President's Day
  642.                      D = Daylight Saving Time
  643.                      M = Memorial Day
  644.                      L = Labor Day
  645.                      C = Columbus Day
  646.                      S = Return to "Standard" Time
  647.                      E = Election Day
  648.                      T = Thanksgiving Day
  649.                      A = Advent 1st Sunday
  650. EasterDay() -- This returns the day of Easter. It doesn't work as easily as
  651.                those dates given above, so has it's own function.
  652.                Usage: EasterDay(<nYear>) && nYear = YYYY format
  653. nDoW()      -- Numeric Day of Week -- used to return the numeric value of a 
  654.                character day of the week, useful for some of the revised
  655.                functions below.
  656.                Usage: nDoW(<cDay>)
  657. FWDoM()     -- First Working Day Of the Month -- this returns the first working
  658.                day of the month passed to the function.
  659.                Usage: FWDoM(<dDate>)
  660. LWDoM()     -- Last Working Day Of the Month --  returns the last working day
  661.                of the month passed to the function.
  662.                Usage: LWDoM(<dDate>)
  663. FDoD()      -- First Day of Date -- this returns the first occurrence of a given
  664.                day of the week within a month. For example, you might need the
  665.                first Monday of the month. 
  666.                Usage: FDoD(<dDate>,"<cDay>")  (cDay = Monday, Tuesday, etc.)
  667. LDoD()      -- Last Day of Date -- This returns the last occurrence of a given
  668.                day of the week within a month. For example, you might need the 
  669.                last Monday in a month.
  670.                Usage: LDoD(<dDate>,"<cDay>")
  671. LDoM()      -- Last Day of Month -- this returns the last day of the month
  672.                as a date. It's used in LDoD and LWDoM above.
  673.                Usage: LDoM(<dDate>)
  674. NumDoD()    -- Number of Day of Date -- this returns a specific occurrence of a
  675.                given day of the week within a month. For example, you might need
  676.                the 3rd Tuesday of the month.
  677.                Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
  678. WDIF()      -- Work Days In the Future -- this is used to return the date based
  679.                on a number of work-days from another date. For example, you 
  680.                could find the date of the 10th work date from today (date())
  681.                by using date(),10 as the parameters in the format below. This
  682.                function can use a HOLIDAYS database to be more accurate, but
  683.                you must create it in a specific format (see complete function 
  684.                documentation in the file DATES.PRG).
  685.                Usage: WDiF(<dStart>,nWDays)
  686. StoD()      -- String to Date -- this returns a "normal" dBASE date from a
  687.                character string containing formats of YYYYMMDD or YYMMDD.
  688.                Usage: StoD("<cString>")
  689. Quarter()   -- This function returns the "Quarter" of the year that a specified
  690.                date is in ...
  691.                Usage: Quarter(<dDate>)
  692. Dat2Jul()   -- Convert dBASE date to Julian date
  693.                Usage: Dat2Jul(<dDate>)
  694. Jul2Dat()   -- Convert Julian date to dBASE date
  695.                Usage: Jul2Dat(<nJulian>)
  696. FrstNxtMth()-- Returns the first day of next month, given a date in 'current'
  697.                month.
  698.                Usage: FrstNxtMth(<dDate>)
  699.  
  700. ---------------------------------
  701. TIME.PRG Time Processing Routines
  702. ---------------------------------
  703. Delay()     -- Delay loop in seconds.
  704.                Usage: Delay(<nSeconds>)
  705. Time2Sec()  -- Convert time string to seconds.
  706.                Usage: Time2Sec(<cTime>)
  707. Sec2Time()  -- Convert seconds to time string.
  708.                Usage: Sec2Time(<nSeconds>)
  709. DiffTime()  -- Calculate difference btween two time strings.
  710.                Usage: DiffTime(<cTime1>,<cTime2>)
  711. Civ2Mil()   -- Convert civilian time string (i.e., "12:59 A.M.") to 24 hour
  712.                (military) time.
  713.                Usage: Civ2Mil(<cCivilTime>)
  714. Mil2Civ()   -- Convert military (24 hour) time to Civilian time.
  715.                Usage: Mil2Civ(<cMilTime>)
  716.  
  717. --------------------------------
  718. FINANCE.PRG -- Finance Functions
  719. --------------------------------
  720. Discount()  -- Compute the present value of an amount received at the end of
  721.                a number of periods given a periodic interest rate.
  722.                Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
  723. FuturVal()  -- Compute the future value of an initial amount at compound
  724.                interest received at a given periodic rate for a number of 
  725.                periods.
  726.                Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
  727. Rate()      -- Compute rate of periodic interest needed to produce a future
  728.                value from a present value in a given number of periods.
  729.                Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
  730. ContRate()  -- Compute rate if compounding is continuous.
  731.                Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
  732. NPV()       -- Net Present Value of array aCashFlow[n].
  733.                Usage: NPV(<nRate>,<nPeriods>)
  734. IRR()       -- Internal Rate of Return, using ZeroIn().
  735.                Usage: Irr(<fX1>,<fX2>,<n_Flag>)
  736.  
  737. --------------------------------------
  738. ARRAY.PRG -- Array Processing Routines
  739. --------------------------------------
  740. AFill()     -- Fills an array with sequential elements. Useful for testing
  741.                array processing routines.
  742.                Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,<nStep>)
  743. AMask()     -- Returns a "mask" specifying the desired row or column of an
  744.                array.
  745.                Usage: AMask(<cArrayskel>,<cVar>)
  746. AMean()     -- Mean of non-blank numeric or date values in specified row or
  747.                column of an array.
  748.                Usage: AMean(<cArrayskel>)
  749. AMax()      -- Maximum non-blank numeric, date or character value in specified
  750.                row or column of an array.
  751.                Usage: AMax(<cArrayskel>)
  752. AMin()      -- Minimum non-blank numeric, date or character value in specified
  753.                row or column of an array.
  754.                Usage: AMin(<cArrayskel>)
  755. AVar()      -- Finds population variance of non-blank numeric or date values
  756.                in specified row or column of a specified array.
  757.                Usage: AVar(<cArrayskel>)
  758. ASeek()     -- Performs a binary search in any specified ascending-sorted row
  759.                or column of an array.
  760.                Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
  761. AShuffle()  -- Performs a shuffle of elements of an array randomly ...
  762.                Usage: aShuffle(<aArray>,<nLength>)
  763. ABubble()--    Performs a bubble sort (slow) on an array. By telling the
  764.                routine the number of passes, you can have it stop at a specific
  765.                point, and obtain some of the highest or lowest values, without
  766.                taking the time to perform a complete sort. To perform a
  767.                complete sort, pass the same value for nPasses as for nLength 
  768.                (number of elements in array) -- if you want a complete sort,
  769.                however, you may want to take another look at ShellSort()
  770.                below ... it's faster.
  771.                Usage: aBubble(<aArray>,<nLength>,<nPasses>)
  772. ArrayRows() -- Returns number of rows (elements) in an array.
  773.                Usage: ArrayRows(<aArray>)
  774. ArrayCols() -- Returns number of columns in an array.
  775.                Usage: ArrayCols(<aArray>)
  776. ShellSort() -- Performs a fast sort routine on an array. This array must be
  777.                copied into an array called: aMyArray. 
  778.                Usage: ShellSort(<nNumber>)
  779. ARec2Arr()  -- Creates a public array, aRecord[n], initialized to the record
  780.                format of the currently selected DBF, either blank or filled
  781.                with the values of the current record.
  782.                Usage: ARec2Arr(<lBlank>)
  783. aPullSort() -- Performs a sort on an array. This array must be copied into an
  784.                array called: aMyArray. This routine is theoretically faster than
  785.                the ShellSort() routine above, and definitely faster than the
  786.                aBubble() routine above.
  787.                Usage: aPullSort(<nNumber>)
  788.  
  789. -----------------------------------------
  790. MEASURE.PRG -- Conversion of Measurements
  791. -----------------------------------------
  792. Kg2Lb()     -- Used to convert Kilograms to Pounds.
  793.                Usage: Kg2Lb(<nKg>)
  794. Lb2Kg()     -- Used to convert Pounds to Kilograms.
  795.                Usage: Lb2Kg(<nPounds>)
  796. Inch2Cm()   -- Inches to Centimeters.
  797.                Usage: Inch2Cm(<nInches>)
  798. Cm2Inch()   -- Centimeters to Inches.
  799.                Usage: Cm2Inch(<nCm>)
  800. Km2Mile()   -- Kilometers to Miles.
  801.                Usage: Km2Mile(<nKm>)
  802. Mile2Km()   -- Miles to Kilometers.
  803.                Usage: Mile2Km(<nMiles>)
  804. Km2Naut()   -- Kilometers to Nautical miles.
  805.                Usage: Km2Naut(<nKm>)
  806. Naut2Km()   -- Nautical miles to Kilometers.
  807.                Usage: Naut2Km(<nNautMiles>)
  808. Naut2Stat() -- Nautical miles to Statute miles (approximate).
  809.                Usage: Naut2Stat(<nNautMiles>)
  810. Stat2Naut() -- Statute miles to Nautical miles (approximate).
  811.                Usage: Stat2Naut(<nStatMiles>)
  812. Fahr2Cel()  -- Fahrenheit to Celsius.
  813.                Usage: Fahr2Cel(<nFahrTemp>)
  814. Cel2Fahr()  -- Celsius to Fahrenheit.
  815.                Usage: Cel2Fahr(<nCelTemp>)
  816. Gal2Ltr()   -- US Gallons to Liters
  817.                Usage: Gal2Ltr(<nGal>)
  818. Ltr2Gal()   -- Liters to US Gallons
  819.                Usage: Ltr2Gal(<nLiters>)
  820. CuFt2Gal()  -- Cubic feet to US Gallons
  821.                Usage: CuFt2Gal(<nCubicFeet>)
  822. Gal2CuFt()  -- US Gallons to Cubic Feet
  823.                Usage: Gal2CuFt(<nGallons>)
  824.  
  825. -----------------------------------
  826. TRIG.PRG -- Trigonometric Functions
  827. -----------------------------------
  828. Note, all of these have the Usage:  FUNC(<nX>)
  829.  
  830. Secant()    -- Secant of an angle X in radians.
  831. Cosecant()  -- CoSecant of an angle X in radians.
  832. CoTan()     -- CoTangent of an angle X in radians.
  833. ASec()      -- Inverse Secant - angle size in radians.
  834. ACoSec()    -- Inverse Cosecant - angle size in radians.
  835. ACoT()      -- Inverse CoTangent
  836. SinH()      -- Hyperbolic Sine
  837. CosH()      -- Hyperbolic CoSine
  838. TanH()      -- Hyperbolic Tangent
  839. SecH()      -- Hyperbolic Secant
  840. CScH()      -- Hyperbolic CoSecant
  841. CoTH()      -- Hyperbolic CoTangent
  842. ASinH()     -- Inverse Hyperbolic Sine
  843. ACosH()     -- Inverse Hyperbolic CoSine
  844. ATanH()     -- Inverse Hyperbolic Tangent
  845. ASecH()     -- Inverse Hyperbolic Secant
  846. ACscH()     -- Inverse Hyperbolic CoSecant
  847. ACotH()     -- Inverse Hyperbolic Cotangent
  848. Hav()       -- Haversine 
  849. AHav()      -- Inverse Haversine
  850.  
  851. -----------------------------------
  852. NAVIGATE.PRG -- Navigation Routines
  853. -----------------------------------
  854. Correct()   -- Correction of direction - adjusts direction given, in degrees,
  855.                by a second number of degrees.
  856.                Usage: Correct(<nDirection>,<xCorrection>)
  857. UnCorrect() -- Uncorrection of direction - adjusts direction given, as above.
  858.                This is the inverse of Correct().
  859.                Usage: UnCorrect(<nDirection>,<xUnCorr>)
  860. XAngle()    -- Angle in degrees (<=90) at which two vectors in degrees
  861.                intersect.
  862.                Usage: XAngle(<nVector1>,<nVector2>)
  863. LeftWind()  -- Effect of second vector on first.
  864.                Usage: LeftWind(<nCourse>,<nWindFrom>)
  865. TailWind()  -- Is the effect of second vector on first additive?
  866.                Usage: TailWind(<nCourse>,<nWindFrom>)
  867. Heading()   -- Heading required to make good a course.
  868.                Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  869. Course()    -- Course made good given heading, speed, wind dir, and force.
  870.                Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  871. GndSpeed()  -- Speed over the ground given heading, etc.
  872.                Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  873. Deg2Num()   -- Degrees to numbers ... converts character description of
  874.                degrees (Degrees Minutes Seconds:  40d50'30.2 N) to numeric
  875.                value.
  876.                Usage: Deg2Num("<cDms>")
  877. BearsDist() -- Distance to an object at the time of the second bearing.
  878.                Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
  879. BearsPass() -- Distance at which an object will be when abeam given 2 bearings.
  880.                Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
  881. BearsRun()  -- Distance to run until object will be abeam given two bearings.
  882.                Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
  883. GCDist()    -- Great Circle distance between 2 points given latitude and long.
  884.                of each. 
  885.                Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  886. GcCourse()  -- Initial Great Circle course between two points given lat and 
  887.                long of each. (Following a 'Great Circle' requires course 
  888.                changes.
  889.                Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  890.  
  891. ---------------------------------
  892. STATS.PRG -- Statistical Routines
  893. ---------------------------------
  894. Samplevar() -- Finds sample variance of specified field of the current database.
  895.                Usage: SampleVar(<cField>[,<cClause>])
  896. Stny()      -- Returns value of the standard normal distribution function given
  897.                a number of standard deviations from the mean.
  898.                Usage: Stny(<nDevs>)
  899. StnArea()   -- Area of the standard normal distribution function between mean
  900.                and given number of standard deviations from the mean.
  901.                Usage: StnArea(<nDevs>)
  902. Stnz()      -- Lookup table to find the values of 'z', standard deviations,
  903.                corresponding to the most common areas inside a given number
  904.                of tails of the normal distribution function.
  905.               Usage: Stnz(<nProb>,<nTails>)
  906. StnDiff()   -- Determines whether hypothesis that sample of a given mean is
  907.                different from expected mean is justified.
  908.                Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
  909.                                <nPopMean>,<nPopStd>)
  910. StnDevs()   -- Calculates 'z', standard deviations, corresponding to any
  911.                area of standard normal curve between mean and the desired
  912.                z. Much slower than Stnz().
  913.                Usage: StnDevs(<nArea>)
  914. TstnArea()  -- Translation function to convert area to left of point under
  915.                standard normal curve to 0 for ZeroIn().
  916.                Usage: TstnArea(<nDevs>,<nArea>)
  917. ZeroIn()    -- Finds a zero of a continuous function.
  918.                Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,<nMaxiter>,;
  919.                               <n_Flag>)
  920.  
  921. ---------------------------------------
  922. FIELDS.PRG -- Field Processing Routines
  923. ---------------------------------------
  924. MemoPagr()  -- Used to display a memo in a window on screen, allows user to
  925.                scroll up and down through memo.
  926.                Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  927. ScanMemo    -- Used to remove hard returns in all memo fields in all records
  928.                of a specified database.
  929.                Usage: Do ScanMemo with "<cDbf>"
  930. Cut         -- Used to cut to a global memvar CLIPBOARD the contents of a field
  931.                or memvar on screen (during a read) -- can then be used with
  932.                PASTE.
  933.                Usage: do Cut with "<cFld>","<cScrType>"
  934. Copy        -- Used to COPY to a global memvar CLIPBOARD the contents of a
  935.                field or memvar on screen, so it can be used with PASTE.
  936.                Usage: do Copy with "<cFld>"
  937. Paste       -- Used to paste the contents of CLIPBOARD (global memvar) to
  938.                the current field.
  939.                Usage: do Paste with "<cFld>","<cScrType>"
  940. Blanker()   -- Used to blank out a numeric field upon input of a valid numeric
  941.                item. Useful with GETs ...
  942.                Usage: Blanker()
  943.  
  944. -----------------------------------
  945. FILES.PRG -- File Handling Routines
  946. -----------------------------------
  947. AllTags     -- Used to bring up a popup/picklist of MDX tags ... can be
  948.                assigned to a function key.
  949.                Usage: do AllTags with <nULRow>,<nULCol>
  950. RedoTags    -- Used to deal with "bloated" MDX files. This will delete old
  951.                tags and recreate the MDX file, reducing the size of it, and
  952.                making access faster. 
  953.                Usage: do RedoTags with "<cDBF>" && note, do not include ext.
  954. AutoRedo    -- Used to bring up a picklist of DBF files, so that you (or the
  955.                user) can choose which to redo the tags for.
  956.                Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,<cColor>)
  957. PrntTags    -- Used to print a list of tags/expressions to either the printer
  958.                or a file for a specific database.
  959.                Usage: do PrntTags with "<cDBF>"
  960. ListDBFs    -- Used to create a simple database (DBFS.DBF) containing the names
  961.                of all databases in the current directory.
  962.                Usage: do ListDBFs
  963. ReCompile() -- Recompiles all dBASE source-code files. 
  964.                Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
  965. MakeDbf     -- Makes an empty DBF.
  966.                Usage: Do MakeDbf with <cFileName>,<aArray>
  967. MakeDbf2    -- Makes an empty DBF, assumes array aMakeDBF[n,5].
  968.                Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
  969. MakeStru()  -- Makes an empty dBASE Structure EXTENDED file and returns its
  970.                root name.
  971.                Usage: MakeStru()
  972. MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE print
  973.                redirection. User/programmer may specify to save database
  974.                in directory specified by DBTMP (DOS Environment variable) or
  975.                in the current directory.
  976.                Usage: MakeStru2(<lDBTmp>)
  977. TempName()  -- Returns a name that can be used for a file of given extension
  978.                without conflicting with names of existing files. If extension
  979.                is 'DBF', assures that no .DBT or .MDX of that name exists as 
  980.                well.
  981.                Usage: TempName(<cExtension>,<lDBTmp>)
  982. FileMove    -- Used to handle data entry/editing, allowing the user to move
  983.                through the database by pressing specific keys. See internal
  984.                docs for more detail.
  985.                Usage: do FileMove with <nKey>
  986. Used()      -- Checks to see if a database is currently in use -- returns a
  987.                logical.
  988.                Usage: Used("<cFile>")
  989. MDXByte()   -- Used to set the MDX Byte in a DBF header ON or OFF.
  990.                Usage: MDXByte(<cDBFPath>,<cOnOff>)
  991. aDir()      -- Creates a public array GADIR[n,4] containing directory 
  992.                information. It is limited to 292 files or less, depending on
  993.                the memory available. Requires SEARCH.BIN.
  994.                Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
  995. DBFDir()    -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
  996.                directory information. Uses the DOS 5.0 DIR command, and requires
  997.                DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS VERSIONS OF DOS.
  998.                Usage: DBFDir(<cPathSkel>,<lHidSys>)
  999. ParsPath()  -- Extracts and returns the path from a full path file 
  1000.                specification.
  1001.                Usage: ParsPath(<cFullPath>)
  1002. TagPop      -- Brings up a picklist of .MDX Tags for current database, so user
  1003.                can change sequence data is listed in. Lists key, whether or not
  1004.                tag has a 'for' clause or is unique, and gives most (if not all)
  1005.                of expression for the tag.
  1006.                Usage: do TagPop
  1007. AAppend()   -- Appends a text file into an array. This routine is limited to
  1008.                text files of 1,170 lines, and 254 characters per line. The
  1009.                text file must be an ASCII .TXT formatted file. Warning -- if
  1010.                array already exists, it will be overwritten.
  1011.                Usage: AAppend(<cFileName>,<aArrayName>)
  1012. FDel()      -- Deletes a given portion of a file (text or binary) from the
  1013.                beginning of the file, end of the file, or current pointer
  1014.                position. 
  1015.                Usage: FDel(<nHandle>,<nBytes>,<nStart>)
  1016. FGetLine()  -- Extracts a line of text from a text file.
  1017.                Usage: FGetLine(<cFileName>,<cLookup>[,<lCase>[,<lEntire>]])
  1018. FIns()      -- Inserts specified number of nulls into a low-level file. See
  1019.                comments on FDel().
  1020.                Usage: FIns(<nHandle>,<nBytes>,<nStart>)
  1021. GetInfo()   -- Retrieves information from STATUS that you cannot get with the
  1022.                dBASE IV function SET(). Keywords are:
  1023.                    WORK       Number of work area currently in
  1024.                    PRINT      Current printer destination (PRN, NUL, etc.)
  1025.                    ERROR      Error condition set by ON ERROR
  1026.                    ESCAPE     Escape condition set by ON ESCAPE
  1027.                    F2 to F10
  1028.                    Ctrl-F1 to Ctrl-F10
  1029.                    Shift-F1 to Shift-F10
  1030.                               Current setting of each key as set by SET FUNCTION
  1031.                    PAGE,LINE  Line number specified by ON PAGE AT LINE
  1032.                    HANDLE,<filename>
  1033.                               Handle number of low-level file <filename>
  1034.                    NAME,<filehandle>
  1035.                               Filename of low-level file specified by 
  1036.                                 <filehandle>
  1037.                    MODE,<filehandle>
  1038.                               Privilege of low-level file spec. by <filehandle>
  1039.                Usage: GetInfo(<cKeyWord>[,<cKeyWord2>])
  1040. TextLine()  -- Returns the number of lines of text in an ASCII Text file.
  1041.                Usage: TextLine(<cTextFile>)
  1042. TLine()     -- Returns a specific line in an ASCII Text File.
  1043.                Usage: TLine(<cTextFile>,<nLine>)
  1044. TLineNo()   -- Returns the line number of the phrase you are searching for
  1045.                in an ASCII Text File.
  1046.                Usage: TLineNO(<cTextFile>,<cLookup>[,<lCase])
  1047. TempFile()  -- Returns a random filename in temporary directory.
  1048.                Usage: TempFile([cFileExt])
  1049. TempDir()   -- Returns path of temporary directory as set from DOS (i.e.,
  1050.                SET DBTMP=...).
  1051.  
  1052. ----------------------------------
  1053. MISC.PRG -- Miscellaneous Routines
  1054. ----------------------------------
  1055. PlayIt()    -- Plays a song based on parameter passed. 1 = Dirge, 
  1056.                2 = "touchdown", programmer may add more as needed ...
  1057.                Usage: PlayIt(<nSong>)
  1058. PageEst     -- Will estimate number of pages in a report, and then ask if you
  1059.                wish to generate said report ... requires three parameters:
  1060.                nCount = record count (may be 0, in which case procedure will
  1061.                         try to count the records)
  1062.                cReport = report name, with any FOR condition you wish -- if
  1063.                          you use a FOR condition, and give a '0' for the nCount
  1064.                          parameter, the procedure will count the records that
  1065.                          match the FOR (only a FOR is setup at the moment).
  1066.                nRecords = number of records that will print on a page. If you
  1067.                          send '0', the procedure will calculate based on 60 
  1068.                          records to the page.
  1069.                Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
  1070. Permutes()  -- Permutations of a number of items taken x amount at a time.
  1071.                Usage: Permutes(<nNum>,<nHowMany>
  1072. Combos()    -- Combinations, similar to above -- slight difference. See docs.
  1073.                Usage: Combos(<nNum>,<nHowMany>)
  1074. BinLoad()   -- A function used to manage .BIN files.
  1075.                Usage: BinLoad(<cBinName>)
  1076. DialUp()    -- A simple dialer routine. (No longer requires LOWLEVEL.BIN)
  1077.                Usage: DialUp(<cPhoneNo>)
  1078. CurrPort()  -- Returns the current port being used by the SET PRINT command.
  1079.                Requires a database (CURRPORT.DBF, one field, 80 characters,
  1080.                called CURRPRT, indexed on said field ...)
  1081.                Usage: CurrPort()
  1082. FileLock()  -- Returns a logical if an attempt to lock a file on a LAN was
  1083.                successful, displays a message otherwise.
  1084.                Usage: FileLock("<cColor>")
  1085. RecLock()   -- Returns a logical if an attempt to lock a record on a LAN was
  1086.                successful, displays a message otherwise.
  1087.                Usage: RecLock("<cColor>")
  1088. DosShell    -- Swaps out dBASE from memory, loads a DOS shell.
  1089.                Usage: do DosShell with <cAppName>
  1090. IsDisk()    -- Checks a disk in a disk drive to see if it's valid (door open,
  1091.                unformatted disk, etc.). Uses DISK.BIN.
  1092.                Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
  1093.  
  1094. -------------------------------------
  1095. SCA.PRG -- SCA Date Handling Routines
  1096. -------------------------------------
  1097. SCA_Real    -- Special purpose for SCA (Society for Creative Anachronism),
  1098.                brings up a window, enter date in SCA dates, converts to "real"
  1099.                dates (dBASE format).
  1100.                Usage: do SCA_Real
  1101. SCA2Real()  -- This function works like SCA_Real, without the user-input.
  1102.                Usage: SCA2Real(<cDay>,<cMonth>,<cYear>) && cyear=Roman Numeral
  1103. Real_SCA()  -- Used to convert 'real' (dBASE format) dates into SCA dates.
  1104.                (see SCA_Real Procedure above)
  1105.                Usage: Real_SCA(<dDate>)
  1106.  
  1107. ------------------------------------------------------
  1108. FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
  1109. ------------------------------------------------------
  1110. SetRand     -- Procedure used to set a random # table, based on the time it
  1111.                is called, multiplied by the seconds at that moment. Useful
  1112.                for calling before using any of routines below. Used ONCE
  1113.                in a dBASE session, should be enough. The reason for this
  1114.                procedure is that I have found that using RAND(-1) often returns
  1115.                exactly the same values if the exact same function call (i.e.,
  1116.                Dice() below) is made several times. This doesn't, therefore,
  1117.                do what I want. By using the current TIME, I can get a different
  1118.                random number table each time. Use EITHER this function OR
  1119.                RAND(-1) during any one session of dBASE.
  1120. Dice()      -- Used to simulate the roll of a dice, will handle different types
  1121.                of dice (for FRPG type games, where you have 4,6,8,10,12,20,100
  1122.                sided dice ...)
  1123.                Usage: Dice(<nSides>)
  1124. MultDice()  -- As above but for multiple die (more than one).
  1125.                Usage: MultDice(<nNum>,<nSides>)
  1126. ValiDice()  -- Asks a gamer to enter a valid die roll, GM/Programmer specifies
  1127.                # of dice, number of sides ... (i.e., 3d6 is 3 six-sided dice,
  1128.                if GM says: 3,6 the program will ask for a value from 3 to 18,
  1129.                and not allow any other input).
  1130.                Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1131. DiceChoose()-- Presents three choices (in menu format) for gamer to use, die
  1132.                dice rolls ...
  1133.                Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1134. ParseDice() -- Used to parse character field/memvar for xdy+z format of dice
  1135.                (a standard gaming format) and evaluate the value. I.e.,
  1136.                3d6+1 = 3 six-sided dice, +1 for each die rolled, giving a
  1137.                range from 6 to 21 -- function will return random number in 
  1138.                that range (actually "rolling" 3 six-sided dice, adding 1 in
  1139.                example). 
  1140.                Usage: ParseDice("<cDiceString>")
  1141. PopDice        Used to popup a place the user can enter a quick die roll, and
  1142.                have the computer do the actual dice rolling. Handy little
  1143.                routine ...
  1144.                Usage: do PopDice with <cColor>
  1145.                Example: ON KEY LABEL ALT-D DO POPDICE WITH "rg+/rg,w+/n,rg+/rg"
  1146.  
  1147. --------------------------------------------------------------------------------
  1148. WINDOWS.PRG -- People are beginning to want things that look like MicroSoft
  1149. Windows. Here are routines that do some of that. 
  1150. --------------------------------------------------------------------------------
  1151. Alert()      -- A popup with an "OK" pad, designed to force the user to
  1152.                 acknowledge the message.
  1153.                 Usage: Alert("<cTitle>","<cMessage>")
  1154. CheckBox()   -- One line message, with a check box to change the status of
  1155.                 a logical memvar.
  1156.                 Usage: CheckBox(<lVar>,"<cTitle>",<nRow>,<nCol>,<nAscii>)
  1157. CheckBx1()   -- Same as above, but is programmed a bit differently.
  1158.                 Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
  1159. DropDown()   -- Performs a picklist with an array, or a field in a database.
  1160.                 Holds a choice in a holding area, allowing user to use that,
  1161.                 or select something else.
  1162.                 Usage: DropDown("<cType>","<cName>",[<nRow,[<nCol>,[<nSize>]]])
  1163. MSWind()     -- Creates a window that acts like a "MS Windows" window, in that
  1164.                 you can move it, enlarge it to full screen, and bring it
  1165.                 back to its original size.
  1166.                 Usage: MSWind(<nTop>,<nLeft>,<nLower>,<nRight>)
  1167. Enlarge      -- Routine used with MSWIND() above to enlarge the window.
  1168.                 Usage: do Enlarge
  1169. MoveWinU     -- Routine used to Move the window (MSWIND()) up on the screen.
  1170.                 Usage: do MoveWinU
  1171. MoveWinD     -- Same as above to move window (MSWIND()) down.
  1172.                 Usage: do MoveWinD
  1173. MSWinAct     -- Used to perform action(s) inside the window (MSWIND()).
  1174.                 This routine should be modified for each specific system ...
  1175.                 This one is just a sample ...
  1176.                 Usage: do MSWinAct with <nTop>,<nLeft>
  1177. RadioBut()   -- Radio Button routine.
  1178.                 Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,<nAscii>)
  1179. TmpRadio     -- Used to set/reset temporary array aTmpRadio used with RadioBut()
  1180.                 routine above.
  1181.                 Usage: Do TmpRadio
  1182. ScrolBar()   -- Performs a horizontal scroll-bar to find a record in a database
  1183.                 file.
  1184.                 Usage: ScrolBar(<nAtLine>)
  1185. Alert2()     -- Same as Alert() above, but uses a Window, shadow, and 
  1186.                 programmable colors.
  1187.                 Usage: Alert2("<cTitle>","<cMessage>","<cColor>")
  1188. MSWind2()    -- Acts like above, but title (due to a ... feature ... of dBASE IV
  1189.                 version 1.5) does not display if enlarged.
  1190.                 Usage: MsWind2(<nTop>,<nLeft>,<nLower>,<nRight>,"<cColor>",;
  1191.                                "<cTitle>")
  1192. Enlarge2     -- Used with MSWind2() to enlarge to full-screen.
  1193.                 Usage: do Enlarge2 with cTitle, cTitlCol
  1194. MoveWind     -- Used with MSWind2() to move the window.
  1195.                 Usage: do MoveWin with <pPad>
  1196. MSWinAt2     -- Used to perform an action inside the window from MSWind2().
  1197.                 Usage: do MSWinAt2
  1198. FieldNum()   -- Used to return the number of a given fieldname in the database
  1199.                 structure. Works only on an open database.
  1200.                 Usage: FieldNum("<cFldName>")
  1201.  
  1202. --------------------------------------------------------------------------------
  1203. OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV, 1.5,
  1204. (or other reasons) are no longer necessary. However, if you are a user of 1.1,
  1205. and/or wish to still use these functions, they are still available, but with
  1206. little support.
  1207. --------------------------------------------------------------------------------
  1208. Empty()     -- Returns a logical (.t. or .f.) if a field or memvar is empty. 
  1209.                In release 1.5 this is replaced with the internal function: 
  1210.                ISBLANK().
  1211.                Usage: Empty(<cField>)
  1212.                Recommendation: If creating a system that uses both dBASE IV
  1213.                versions 1.5 and earlier versions, rename this function to 
  1214.                ISBLANK(). If the system is an earlier version of dBASE, this
  1215.                function will be used, and if 1.5 or later, the internal function
  1216.                will be used.
  1217. NumFlds()   -- Counts the fields in a given database. This is replaced in 
  1218.                version 1.5 of dBASE IV with FLDCOUNT().
  1219.                Usage: NumFlds(<cDBF>)
  1220. DateSet()   -- Returns a string giving name of current DATE format.
  1221.                Usage: DateSet()
  1222. StampVal()  -- Evaluates a 16-character string in the form of the rightmost 
  1223.                16 characters returned by the DOS DIR command for a file.
  1224.                Usage: StampVal(<cTimeStamp>)
  1225. FullWin     -- Handy to overlay a screen with a full-screen window ...
  1226.                Usage: do FullWin with "<cColor>","<cWinName>","<cScreen>"
  1227. SetColor    -- used to set a memory file with colors, or load colors into
  1228.                memory variables from a memory file.
  1229.                Usage: do SetColor
  1230. SetColor2   -- used to set a mem file as above, but asks for a parameter to
  1231.                be sent, so that when designing a system, you can ask the
  1232.                user if their monitor is color or mono ... you pass "Y" or
  1233.                "N" ... i.e.,
  1234.                Usage: do SetColor2 with "<cYN>"
  1235. ExtrClr()   -- Used to extract the first parameter of a color memory variable.
  1236.                Usage: ExtrClr(<cColorVar>)
  1237. InvClr()    -- Can invert the colors of a color memory variable.
  1238.                Usage: InvClr(<cColorVar>)
  1239.  
  1240. --------------------------------------------------------------------------------
  1241. Enjoy. Happy computing. 
  1242.  
  1243. KJM
  1244. --------------------------------------------------------------------------------
  1245. -- EoF: README.TXT
  1246. --------------------------------------------------------------------------------
  1247.